<script lang="ts">
  import { useRouter } from 'vue-router';

  export default {
    setup(): void {
      const router = useRouter();
      const {
        params: { path },
        query,
      } = router.currentRoute.value;
      try {
        router.replace({ path: '/' + path, query });
      } catch (e) {
        console.log(e);
      }
    },
  };
</script>
